#ifndef __POINT_H
#define __POINT_H

#define IMG_CENTER_X 320
#define IMG_CENTER_Y 240

//#define IMG_CENTER_X 550
//#define IMG_CENTER_Y 420

#define CAMERA_HEIGHT 45
#define MOTOR_HEIGHT 10

extern int black_piece_idx;
extern int whute_piece_idx;

typedef enum {
	EMPTY,
	WHITE,
	BLACK
} PointType;

typedef struct {
    volatile int x;
	volatile int y;
	PointType type;
} Point;

extern Point Origin;

extern Point PieceBoard[9];

extern Point Corners[4];

extern Point WhitePiece[5];

extern Point BlackPiece[5];

extern Point WhitePieceBuffer[5];

extern Point BlackPieceBuffer[5];

extern Point Motor;

extern Point Middle;

void GroundtoTop (Point *ground);

void ToptoGround (Point *top);

void UpdatePieceBoardType(void);

#endif
